Skip to content

Conversation

@cidlik
Copy link
Contributor

@cidlik cidlik commented Nov 20, 2025

Description

TL;DR

  • get_output() should return some result;
  • should attach kernel driver back in the destructor otherwise HIDRAW device will not appear if it has existed.

Hello there! I have a USB HID relay and tests for it and I face with the issue when after labgrid using the relay will not display in /dev system. Only replugging helps to fix it.

I notice that the device attachment is not performed at the USBHIDRelay destructor, and it seems to me ambiguous because the device doesn't return to the initial state.

I ran multiple pytest processes to test concurrent situations which were fixed in 1526. Tests are passed.

Checklist

  • PR has been tested

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.2%. Comparing base (c609d2d) to head (980a992).
⚠️ Report is 228 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/util/agents/usb_hid_relay.py 0.0% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (c609d2d) and HEAD (980a992). Click for more details.

HEAD has 15 uploads less than BASE
Flag BASE (c609d2d) HEAD (980a992)
3.11 4 1
3.10 4 1
3.9 4 1
3.13 4 1
3.12 4 1
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #1776      +/-   ##
=========================================
- Coverage    56.0%   45.2%   -10.9%     
=========================================
  Files         170     172       +2     
  Lines       13307   13572     +265     
=========================================
- Hits         7458    6136    -1322     
- Misses       5849    7436    +1587     
Flag Coverage Δ
3.10 45.2% <0.0%> (-11.2%) ⬇️
3.11 45.2% <0.0%> (-11.2%) ⬇️
3.12 45.2% <0.0%> (-11.2%) ⬇️
3.13 45.1% <0.0%> (-11.2%) ⬇️
3.14 45.1% <0.0%> (?)
3.9 45.2% <0.0%> (-11.2%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Emantor Emantor force-pushed the usb_hid_relay_issue branch from e5b5425 to 423b8c2 Compare November 21, 2025 10:50
* get_output() should return some result;
* should attach kernel driver back in the destructor otherwise HIDRAW
  device will not appear if it has existed.

Signed-off-by: Roman Kuznecov <[email protected]>
@cidlik cidlik force-pushed the usb_hid_relay_issue branch from 423b8c2 to 980a992 Compare November 21, 2025 18:13
@cidlik
Copy link
Contributor Author

cidlik commented Nov 25, 2025

Hello there! @jluebbe, can you review the change, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants